package com.itheima.test3;

import java.io.*;

/**
 * @Author:gy
 * @Date: 2025/08/28 11:41
 * @Description:
 */
public class Demo2 {
    //字节缓冲输入输出流的练习
    public static void main(String[] args) throws Exception {
        long start = System.currentTimeMillis();
        //字节缓冲输入流  读
        BufferedInputStream bis = new BufferedInputStream(new FileInputStream("D:\\班级\\93期\\day10-IO\\测试\\素材\\ち痴か汉ん.avi"));
        //字节缓冲输出流  写
        BufferedOutputStream bos = new BufferedOutputStream(new FileOutputStream("Day10\\ち痴か汉ん.avi",true));

        //读写使用是一样的
        int b;
        while ((b = bis.read()) != -1) {
            bos.write(b);
        }
        bis.close();
        bos.close();
        long end = System.currentTimeMillis();
        System.out.println(end-start);
    }
}
